(() => {
    class Animal {
        constructor(name) {
            this.name = name;
        }
    }
    class Dog extends Animal {
        //非抽象类继承抽象类 必须重写父类中的抽象方法
        sayHello() {
            console.log("汪汪汪");
        }
    }
    const dog = new Dog("旺财");
    dog.sayHello();
})();
